<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/7/9
  Time: 10:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<div class="public-content" id="apply-reimbursement">
</div>

<script type="text/x-handlebars-template" id="reimbursement_list_tpl">
    <table class="public-content-tab csl-table" style="margin-bottom: 20px">
        <thead>
        </thead>
        <tbody>
        <!--第一行-->
        <tr>
            <td>借款人(甲方)</td>
            <td colspan="4" class="keyInfo ">{{realName}}</td>

            <td>身份证号码</td>
            <td colspan="4" class="keyInfo ">{{idCard}}</td>
        </tr>
        <!--第二行-->
        <tr>
            <td>贷款人（乙方）</td>
            <td colspan="9" class="keyInfo">
                <!-- ngIf: sid!=10 --><span class="keyInfo  " ng-if="sid!=10">{{order.first_party}}、{{order.first_party_idcard}}、{{order.first_party_province}}{{order.first_party_city}}{{order.first_party_area}}{{order.first_party_address}}</span>
                <!-- end ngIf: sid!=10 -->
            </td>
        </tr>
        <!--第三行-->
        <tr>
            <td>关联合同编号</td>
            <td colspan="9" class="keyInfo ">{{order.contractNo}}的贷款合同</td>
        </tr>
        <tr>
            <td>客户姓名</td>
            <td colspan="3" class="keyInfo ">{{realName}}</td>
            <td>贷款发放日期</td>
            <td class="keyInfo">
                <!-- ngIf: sid!=10 --><span ng-if="sid!=10" class=" ">{{order.loanTime}}</span>
                <!-- end ngIf: sid!=10 -->
                <!-- ngIf: sid==10 -->
            </td>
            <td>借款金额/元</td>
            <td class="keyInfo" style="text-align: center !important;">￥{{#thounsandBit order.applyMoney}}{{/thounsandBit}}
                <div class="public-content-chinese">({{#chinese order.applyMoney}}{{/chinese}})</div>
            </td>
            <td>放款金额/元</td>
            <td class="keyInfo" style="text-align: center !important;">￥{{#thounsandBit order.loan_amount}}{{/thounsandBit}}
                <div class="public-content-chinese">({{#chinese order.loan_amount}}{{/chinese}})</div>
            </td>
        </tr>
        </tbody>
    </table>
    <!-- ngIf: _data.orderSortList.length > 0 -->
    <table class="public-content-tab csl-table " ng-if="_data.orderSortList.length > 0"  style="margin-bottom: 20px">
        <tbody>
        <!--第一行-->
        <tr class="thead">
            <td>期数</td>
            <td>还款日期</td>
            <td>每月还款本金</td>
            <td>每月还款利息</td>
            <td>合计</td>
            <td>实际收款金额</td>
            <td>余款</td>
            <td>状态</td>
        </tr>
        {{#each orderSortList}}
        <tr class="csl-tr " ng-repeat="i in _data.orderSortList">
            <td class="">{{periods}}</td>
            <td class="">{{repayment_time}}</td>
            <td class="">￥{{#thounsandBit month_repayment_money}}{{/thounsandBit}}</td>
            <td class="">￥{{#thounsandBit moth_repayment_rate}}{{/thounsandBit}}</td>
            <td class="">{{#IF_EQ @index 0}}
                ￥{{#add comprehensive month_repayment_money moth_repayment_rate}}{{/add}}
                {{else}}
                ￥{{#add month_repayment_money moth_repayment_rate}}{{/add}}
                {{/IF_EQ}}
            </td>
            <td class=" ">
                {{#if real_payment_money}}
                ￥{{#thounsandBit real_payment_money}}{{/thounsandBit}}
                {{/if}}
            </td>
            <td class=" ">
                {{#residue month_repayment_money moth_repayment_rate real_payment_money}}
                ￥{{#addAndSub month_repayment_money moth_repayment_rate real_payment_money}}{{/addAndSub}}
                {{else}}
                ￥0
                {{/residue}}
            </td>
            <td>
                {{#IF_NEQ ps_id 1}}
                {{#IF_NEQ ps_id null}}
                {{#IF_NEQ ps_id 7}}
                {{#IF_NEQ ps_id 9}}
                <span class="iconfont icon-tips2" style="color:rgb(247,183,53);font-size: 20px;"></span>
                {{/IF_NEQ}}
                {{/IF_NEQ}}
                {{/IF_NEQ}}
                {{/IF_NEQ}}
                {{#expression ps_id '==' 1 '||' ps_id '==' 7 '||' ps_id '==' 9}}
                <span class="iconfont icon-zhengque1"
                      style="color:rgb(122,202,124);font-size:20px"></span>
                {{/expression}}
                {{#IF_EQ ps_id null}}
                <span class="iconfont icon-zhengque1"
                      style="color:rgb(151,151,151);font-size:20px"></span>
                {{/IF_EQ}}
            </td>
        </tr>
        {{/each}}
        </tbody>
    </table>
    {{#each orderSortList}}
    {{#IF_EQ ps_id 5}}
    <table class="public-content-tab csl-table">
        <tbody>
        <!--第一行-->
        <tr class="thead">
            <td>次数</td>
            <td>还款日期</td>
            <td>计划收款</td>
            <td>剩余本金</td>
            <!-- <td></td> -->
            <td>违约金</td>
            <td>滞纳金</td>
            <td>实际收款</td>
            <td>状态</td>
        </tr>
        <!--第二行-->
        <tr class="csl-tr" ng-repeat="i in dataSche">
            <td>{{periods}}</td>
            <td>{{repayment_time}}</td>
            <td>￥{{#thounsandBit month_repayment_money}}{{/thounsandBit}}</td>
            <td>￥{{#thounsandBit month_repayment_money}}{{/thounsandBit}}</td>
            <td>￥{{#thounsandBit penalty}}{{/thounsandBit}}</td>
            <td>￥{{#thounsandBit late_fee}}{{/thounsandBit}}</td>
            <td>
                ￥{{#add month_repayment_money destruction penalty late_fee}}{{/add}}
            </td>
            <td>
                {{#IF_NEQ ps_id 1}}
                {{#IF_NEQ ps_id null}}
                {{#IF_NEQ ps_id 7}}
                <span class="iconfont icon-tips2" style="color:rgb(247,183,53);font-size: 20px;"></span>
                {{/IF_NEQ}}
                {{/IF_NEQ}}
                {{/IF_NEQ}}
                {{#expression ps_id '==' 1 '||' ps_id '==' 7}}
                <span ng-if="i.ps_id == 1" class="iconfont icon-zhengque1"
                      style="color:rgb(122,202,124);font-size:20px"></span>
                {{/expression}}
                {{#IF_EQ ps_id null}}
                <span ng-if="i.ps_id == null" class="iconfont icon-zhengque1"
                      style="color:rgb(151,151,151);font-size:20px"></span>
                {{/IF_EQ}}
            </td>
        </tr>
        </tbody>
    </table>
    {{/IF_EQ}}
    {{/each}}

</script>

